package com.bigscreen.dao.Impl;

import com.bd1904.conf.Constants;
import com.bd1904.db.JedisUtil;
import com.bigscreen.dao.TimeAmtDao;
import org.springframework.stereotype.Repository;
import redis.clients.jedis.Jedis;

@Repository
public class TimeAmtDaoImpl implements TimeAmtDao {
    @Override
    public Double getAmtByTime(String time) {
        Jedis jedis = JedisUtil.getJedis();
        String timeAmt = jedis.hget(Constants.JEDIS_CALC_TIME_AMT, time);
        JedisUtil.release(jedis);
        return Double.valueOf(timeAmt);
    }
}
